#include "pid.h"

IncrementalPID left_pid(10.0f, 1.0f, 0.0f);
IncrementalPID right_pid(10.0f, 1.f, 0.0f);

// 提供给 C 文件调用的封装函数
extern "C" {
    int compute_left_pid(int setpoint, int measured_value) {
        return left_pid.compute(setpoint, measured_value);
    }

    int compute_right_pid(int setpoint, int measured_value) {
        return right_pid.compute(setpoint, measured_value);
    }
}
